#include<stdio.h>
int main()
{
    int i,j;
    for(i=1000;i<=2000;i++)
    {
        int k=i,sum=0;
        while(k!=0)
        {
            sum=sum*10+k%10;
            k=k/10;
        }
        if(9*i==sum)
        printf("%d\n",i);
    }
}